package com.moli.iov.base.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.moli.iov.base.model.dto.req.VehicleFenceBindingDto;
import com.moli.iov.base.model.po.VehicleFence;
import com.moli.iov.base.model.po.VehicleFenceBinding;
import com.moli.iov.rest.RestResponse;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author wanghualin
 * @since 2019-09-03
 */
public interface IVehicleFenceBindingService extends IService<VehicleFenceBinding> {

  /**
   * 添加围栏绑定
   *
   * @param vehicleFenceBindingDto
   * @return
   */

  public RestResponse saveVehicleFenceBinding(VehicleFenceBindingDto vehicleFenceBindingDto,VehicleFence vehicleFence);


  /**
   * 删除围栏绑定
   *
   * @param vehicleFenceBindingDto
   * @return
   */
  public  RestResponse deleteVehicleFenceBinding(VehicleFenceBindingDto vehicleFenceBindingDto,VehicleFence vehicleFence);

  /**
   * 批量添加围栏绑定
   * @param list
   * @param vehicleFence  围栏
   * @return
   */
  public  RestResponse saveBatchVehicleFenceBinding(List<VehicleFenceBinding> list,
      VehicleFence vehicleFence);

  /**
   * 得到VehicleFenceBindingList
   *
   * @param fenceId 围栏Id
   * @param listVin 车架号
   * @return
   */
  List<VehicleFenceBinding> listVehicleFenceBinding(Long fenceId, List<String> listVin);

  /**
   * 批量删除
   * @param list
   * @param vehicleFence
   * @return
   */
  RestResponse deleteBatchVehicleFenceBinding(List<VehicleFenceBinding> list, VehicleFence vehicleFence);

  /**
   * 得到围栏绑定个数
   * @param id
   * @return
   */
  int countVehicleFenceBinding(Long id);

  /**
   * 报警服务
   * 根据vin 得到绑定围栏
   *
   * @param vin
   * @return
   */
  List<VehicleFence> listFenceIdByVin(String vin);

  /**
   * 初始化VehicleFenceBinding
   */
  void initVehicleFenceBinding();

  /**
   * 得到所有围栏绑定
   * @param vinList
   * @return
   */
  List<VehicleFenceBinding> listVehicleFenceBinding(List<String>vinList);

  /**
   * 围栏绑定出围栏
   * @param vin  车架号
   * @param alarmType 围栏报警类型 (0 进围栏报警，1，出围栏报警)
   * @return
   */
  List<VehicleFenceBinding> listVehicleFenceBinding(String vin,Integer alarmType);
}
